package cn.dengta.webapp.trade.entity;

import cn.dengta.webapp.base.entity.TimeBasedEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@TableName("dt_user_intimacy")
public class UserIntimacy extends TimeBasedEntity {
	/** 较小用户id */
	private Long lowUserId;
	/** 较大用户id */
	private Long highUserId;
	/** 亲密度值，累计消耗的钻石总和 */
	private Integer score;

	public static final String LOW_USER_ID = "low_user_id";
	public static final String HIGH_USER_ID = "high_user_id";
	public static final String SCORE = "score";

	public static UserIntimacy of(Long lowUserId, Long highUserId, Integer score) {
		UserIntimacy ui = new UserIntimacy();
		ui.setLowUserId(lowUserId);
		ui.setHighUserId(highUserId);
		ui.setScore(score);
		return ui;
	}

}
